<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<link href="common/common.css" type="text/css" rel="stylesheet">
<script src="common/sortabletable.js" type="text/javascript"></script>
<script src="common/common.js" type="text/javascript"></script>
<script type="text/javascript" src="common/popcalendar.js"></script>
</head>
<body>

<div id="rightlayout" style="width: 700px">
<div style="text-align: left;color:red"><html:errors /></div>
<html:form	action="/OrderMainAction">
	<input type="button" name="add" class="button" value="添加"
		onClick="redirect('<c:url value="OrderMainAction.do?method=displayOrderCreateScreen"/>')">
	<input type="button" name="delete" class="button" value="批量删除"
		onclick="confirmSubmit('是否删除',this.form,'<c:url value="OrderMainAction.do?method=batchDelete"/>')">
	<input type="button" name="export" class="button" value="导出"
		onclick="confirmSubmit('是否导出查询结果',this.form,'<c:url value="OrderMainAction.do?method=doExport"/>')">
		
	<br>
	产品名称：<html:text property="qProductName" size="20" styleClass="textbox"
		errorStyleClass="textbox_err"></html:text>
	订单日期：<html:text property="qStartTime" size="12" styleClass="textbox"
		errorStyleClass="textbox_err"></html:text>
	<a href
		onclick="popUpCalendar(this, document.forms[0].qStartTime, 'yyyy-mm-dd',-1,-1,false);return false"><img
		src="images/calendar.gif" border="0"></a> 截止到
				<html:text property="qEndTime" size="12" styleClass="textbox"
		errorStyleClass="textbox_err">
	</html:text>
	<a href
		onclick="popUpCalendar(this, document.forms[0].qEndTime, 'yyyy-mm-dd',-1,-1,false);return false"><img
		src="images/calendar.gif" border="0"></a>
	<input type="button" name="query" type="button" class="button"
		value="查询"
		onclick="submitFrm(this.form,'<c:url value="OrderMainAction.do?method=doQuery"/>')">
	<br>

	<!-- 分页及排序 -->
	<c:import url="/common/pager.jsp" />
	<p>
	<table width="100%" class="sort-table" id="itemsList" align="right">
		<thead>
			<tr align="center">
				<td><input type="checkbox" name="multipleSelect"
					onclick="checkBoxSelectAll('ids');" /></td>
				<td>订单编号</td>
				<td>产品名称</td>
				<td>客户</td>
				<td>金额</td>
				<td>下单时间</td>
				<td>操作</td>
			</tr>
		</thead>
		<tbody>
			<c:forEach var='vo' items="${ITEMS_COLLECTION}">
				<tr onmouseout="changeColor(this,false,'orange');"
					onmouseover="changeColor(this,true,'orange')">
					<td><input type="checkbox" name="ids" value="${vo.id}" /></td>
					<td>
					<p align="center">${vo.id}</p>
					</td>
					<td>${vo.productName}</td>
					<td>${vo.customerName}</td>
					<td>
					<p align="right">${vo.totalPrice}</p>
					</td>
					<td><fmt:formatDate value="${vo.orderDate}"
						pattern="yy-MM-dd HH:mm" /></td>
					<td><img src="images/edit.gif" title="编 辑" class="btnImg"
					onclick="javascript:confirmClick('是否修改?','<c:url value="OrderMainAction.do?method=displayOrderUpdateScreen&id=${vo.id}"/>')" /></td>
				</tr>
			</c:forEach>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="7"></td>
			</tr>
		</tfoot>
	</table>
</html:form> <script type="text/javascript">
//SortTable 定义
	//SortTable 定义
	var st = new SortableTable( document.getElementById("itemsList"), ["None", "Number", "String","String","Number","String" ,"None"],'#FFFFCC','#FFFFFF','#B1C3D9');
</script></div>

</body>
</html>

